import httpRequest from '../request/index'

export function articleTypeApi () {
  return {
    getArticleType: (params) => {
      return httpRequest({
        url: '/articletypes',
        method: 'get',
        params
      })
    },
    getAllArticleType: () => {
      return httpRequest({
        url: '/articletype',
        method: 'get'
      })
    },
    addArticleType: (data) => {
      return httpRequest({
        url: '/articletype',
        method: 'post',
        data
      })
    },
    updateArticleType: (data) => {
      return httpRequest({
        url: '/articletype',
        method: 'put',
        data
      })
    },
    deleteArticleType: (data) => {
      return httpRequest({
        url: '/articletype',
        method: 'delete',
        data
      })
    }
  }
}
